﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Hang.Blog.Migrations
{
    public partial class alterCategory : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CategoryPathName",
                table: "AppCategory");

            migrationBuilder.AddColumn<string>(
                name: "FullName",
                table: "AppCategory",
                type: "varchar(1000)",
                maxLength: 1000,
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "FullPath",
                table: "AppCategory",
                type: "varchar(1000)",
                maxLength: 1000,
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<Guid>(
                name: "ParenId",
                table: "AppCategory",
                type: "char(36)",
                nullable: true,
                collation: "ascii_general_ci");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "FullName",
                table: "AppCategory");

            migrationBuilder.DropColumn(
                name: "FullPath",
                table: "AppCategory");

            migrationBuilder.DropColumn(
                name: "ParenId",
                table: "AppCategory");

            migrationBuilder.AddColumn<string>(
                name: "CategoryPathName",
                table: "AppCategory",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");
        }
    }
}
